<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 收集数据 -->
    <div id="app">
        <label for="name">姓名：</label>
        <!-- 姓名： -->
        <input type="text" id="name" v-model="msg">
        <p>{{msg}}</p>
        <!-- 单选框 -->
        <input type="radio" name="sex" id="nan" value="男" v-model="sexRadio"><label for="nan">男</label>
        <input type="radio" name="sex" id="nv" value="女" v-model="sexRadio"><label for="nv">女</label>
        <p>{{sexRadio}}</p>
        <!-- 多选框 单个值   要不true或者false-->
        <input type="checkbox" name="" id="" v-model="singleCheckbox">
        <p>{{singleCheckbox}}</p>
        <!--多选框 单个值   要不true或者false  yes代替true  no代替false  -->
        <input type="checkbox" name="" id="" v-model="singleCheckboxinfo" true-value="yes" false-value="no">
        <p>{{singleCheckboxinfo}}</p>
        <!-- 多选框 多个  eg: 爱好 足球 篮球 乒乓球 台球 -->
        <input type="checkbox" name="hobby" id="football" v-model="checkboxs" value="足球"> <label for="football">足球</label>
        <input type="checkbox" name="hobby" id="basketball" v-model="checkboxs" value="篮球"> <label for="basketball">篮球</label>
        <input type="checkbox" name="hobby" id="pingpongball" v-model="checkboxs" value="乒乓球"> <label for="pingpongball">乒乓球</label>
        <input type="checkbox" name="hobby" id="deskball" v-model="checkboxs" value="台球"> <label for="deskball">台球</label>

        <p>{{checkboxs}}</p>
        <!-- 下拉列表单个选项是设置为空串 -->
        <select name="" id="" v-model="singleSelect">
            <option value="" disabled>请选择</option>
            <option value="星期一">星期一</option>
            <option value="星期二">星期二</option>
            <option value="星期三">星期三</option>
            <option value="星期四">星期四</option>
            <option value="星期五">星期五</option>
        </select>
        <p>{{singleSelect}}</p>
        <!-- 下拉列表多个选项 初始值设置为数组 -->
        <select name="" id="" multiple v-model="select">
            <option value="" disabled>请选择</option>
            <option value="星期一">星期一</option>
            <option value="星期二">星期二</option>
            <option value="星期三">星期三</option>
            <option value="星期四">星期四</option>
            <option value="星期五">星期五</option>
        </select>
        <p>{{select}}</p>
        <!-- 文本域 -->
        <textarea name="" id="" cols="30" rows="10" v-model="textareaTest"></textarea>
        <p>{{textareaTest}}</p>
    </div>
    <script src="../js/vue.js"></script>
    <script>
        let vm = new Vue({
            el:'#app',
            data:{
                msg:'只要功夫深精鼓棒磨成针 ',
                sexRadio:'',
                singleCheckbox:true,
                singleCheckboxinfo:'',
                checkboxs:[],
                singleSelect:'',
                select:[],
                textareaTest:''
            }
        })
    </script>
</body>
</html>